<%@ page language="java" import="java.util.*"pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ page import="pku.ss.news.model.*"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:useBean id="searchResult" type="ArrayList<News>" scope="request"></jsp:useBean>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>MyNews--新闻搜索</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="theme/geren.css">

  </head>
  
  <body>
  
   <div id="header">
	<h1>MY NEWS</h1>
	<ul>
		<li><a href="home.do" accesskey="1" title="">我的首页</a></li>
		<li><a href="catagory.do" accesskey="2" title="">分类新闻</a></li>
		<li><a href="subscription.do" accesskey="3" title="">我的订阅</a></li>
		<li><a href="share.do" accesskey="4" title="">我的分享</a></li>
		<li><a href="logout.do" accesskey="5" title="">登出</a></li>
	</ul>
</div>
  
  
  
  
  
  
  
  
  
  
  
   
  
  
  <div id="content">
<!--colone-->
	<div id="colOne">
			<h3>新闻搜索</h3>
		 <div class="bg2">
  		<form action="search.do" method="get">
  		<input type="text" size='13' name="keyword"value="${searchKey}"/>&nbsp;<input type="submit" class="submit" value="搜索"/> 
  		</form>
  		
  		</div>
		<h3>用户管理</h3>
		<div class="bg2">
			<ul style="font-size:120%;">
				
				<li class="first"><a href="home.do">&nbsp;&nbsp;我的首页</a></li>
				<li><a href="catagory.do">&nbsp;&nbsp;分类新闻</a></li>
				<li><a href="subscription.do">&nbsp;&nbsp;我的订阅</a></li>
				<li><a href="share.do">&nbsp;&nbsp;我的分享</a></li>
				<li><a href="userInfo.jsp">&nbsp;&nbsp;个人信息</a></li>
				<li><a href="updatePassword.jsp">&nbsp;&nbsp;修改密码</a></li>			
			</ul>
		</div>
		

  
  
		</div>
		<!--endone-->
		
	<div id="colTwo">
		
		<h3>搜索结果</h3>
		<div class="bg1">
			<c:forEach items="${searchResult}" var="news">
  	 <a href="news.do?url=${news.url}&title=${news.title}&time=<fmt:formatDate value="${news.time}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>&source=${news.source}&description=${news.description}"target="_blank">${news.title}</a><fmt:formatDate value="${news.time}" type="both" pattern="yyyy-MM-dd HH:mm"/>${news.source}	<br/>
  	 ${news.description}<br/>
  	 <br/>
  	 </c:forEach>
		</div>

		
		
	</div>
</div>
<div id="footer">
	<p>Copyright (c) 2009 All Rights Reserved. Design by <a href="http://www.ss.pku.edu.cn/">北京大学</a>.</p>
</div>
  </body>
</html>
